package com.t235.gc.device.controller;

import com.t235.gc.AjaxResult;
import com.t235.gc.dao.UsersDao;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api
@RestController
public class DemoController {
    @Resource
    private UsersDao usersMapper;
    @Value("${server.port}")
    private String port;

    @GetMapping("/hello")
    public AjaxResult hello() {
        return AjaxResult.success(port + "-hello world " + usersMapper.queryById(1201581319114785L).getNickname());
    }
}
